import 'package:flutter/material.dart';

class PhysicalModelPage  extends StatefulWidget {
  const PhysicalModelPage ({Key? key}) : super(key: key);

  @override
  State<PhysicalModelPage > createState() => _PhysicalModelPageState();
}

class _PhysicalModelPageState extends State<PhysicalModelPage > {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("PhysicalModel 为任意的Widget添加阴影"),
      ),
      body: Center(
        child: PhysicalModel(
          // 阴影的圆角
          borderRadius: BorderRadius.all(Radius.circular(10)),
          // 阴影形状 默认矩形
          shape: BoxShape.rectangle,
          // 背景色
          color: Colors.deepPurple,
          // 阴影颜色
          shadowColor: Colors.orange,
          elevation: 10.0,
          child: Container(
            width: 200,
            height: 200,
            color: Colors.white,
          ),
          ),
      ),
    );
    
  }
}